﻿@model CMSMVC4.Areas.Admin.Models.BackgroundModels
@using CMSMVC4.MultiResource
@{
    ViewBag.Title = "Background";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

<div class="row-fluid">
    <div class="span7" style="width: 100%">
        <div class="box paint color_11">
            <div class="title">
                <h4><span>Background</span> </h4>
            </div>
            <div class="content" style="width: 65%">
                  @using (Html.BeginForm("Add", "Background", FormMethod.Post, new { @class = "form-horizontal cmxform", autocomplete = "off" }))
                  {
                      <div class="form-row control-group row-fluid">
                          <label class="control-label span3">@Admin.Url<span class="help-block">@Admin.Url</span> </label>
                          <div class="controls span7">
                              @Html.TextBoxFor(x => x.Url, new {placeholder = "Url", @class = "span12"})
                          </div>
                      </div>
                      <div class="form-row control-group row-fluid">
                          <label class="control-label span3">@Admin.Images<span class="help-block">@Admin.Images</span> </label>
                          <div class="controls span7">
                              @Html.TextBoxFor(x => x.Name, new {placeholder = "Image", @class = "span7"})
                              <input id="Button1" type="button" value="@Admin.InsertPhoto" class="btn btn-large" style="height: 33px; float: right"/>
                          </div>
                      </div>
                      <div class="form-actions row-fluid">
                          <div class="span7 offset3">
                              <button type="submit" class="btn btn-primary">@Admin.SaveChange</button>
                          </div>
                      </div>
                  }
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $("#Button1").click(function () {
            var finder = new CKFinder();
            finder.selectActionFunction = function (fileUrl) {
                $('#Name').val(fileUrl);
            };
            finder.popup();
        });
    })
</script>
